#pragma once
#pragma warning(disable : 4819)
#include "SDL.h"
#include <any>
#include <utility>

class Game;

struct UpDateResult
{
    bool isSwitchScene = false;
    int sceneType;
    std::any data;
};

class Scene
{
public:
    Scene();
    virtual ~Scene(){}
    virtual void Init() = 0;
    virtual void InitData(std::any data) {}
    virtual void HandleEvent(SDL_Event* event) = 0;
    virtual UpDateResult Update(float deltaTime) = 0;    //返回一个pair，第一个元素表示是否切换场景，第二个元素表示切换到的场景类型
    virtual void Render() = 0;
protected:
    Game& game_;
    UpDateResult updateResult_;
};